<include file="public@header"/>
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('meeting/room/index')}">展位管理</a></li>
        <li class="active"><a href="{:url('meeting/room/picture',['room_id'=>input('room_id')])}">上传资料</a></li>
    </ul>
    <div class="row" style="height: 40px;"></div>

    <div class="row">
        <div class="col-lg-12">
            <div class="col-xs-2"></div>
            <div class="col-xs-1">完善资料</div>
            <div class="col-xs-3"></div>
            <div class="col-xs-1">审核</div>
            <div class="col-xs-3"></div>
            <div class="col-xs-1">通过审核</div>
            <div class="col-xs-1"></div>

        </div>
    </div>
    <div class="progress progress-striped">
        <div class="progress-bar progress-bar-primary" role="progressbar"
             aria-valuenow="60" aria-valuemin="0" aria-valuemax="100"
             style="width: {$w}%;">
        </div>
    </div>
    <div class="row" style="height: 40px;"></div>
    <a href="javascript:test()" class="btn btn-primary">资料下载</a>
    <notempty name="list.remark">
        <a href="https://zhanhuiimg.dehomic.com/{$list.remark}" download="实例.rar" class="btn btn-success">实例下载</a>
    </notempty>
    <notempty name="list.remark2">
        <a href="https://zhanhuiimg.dehomic.com/{$list.remark2}" download="附件.rar" class="btn btn-success">附件下载</a>
    </notempty>
    <php>$status = [0=>'【审核中】',1=>'【已通过】',2=>'【已拒绝】'];</php>
    <if condition="isset($list['status'])&&$list['status'] eq 0">
    <div style="font-size: 26px;color: blue">【审核中】</div>
    </if>
    <if condition="isset($list['status'])&&$list['status'] eq 1">
        <div style="font-size: 26px;color: green">【已通过】</div>
    </if>
    <if condition="isset($list['status'])&&$list['status'] eq 2">
        <div style="font-size: 26px;color: red">【已拒绝】,{$list.reason}</div>
    </if>
    <form method="post" action="{:url('picturePost')}" class="js-ajax-form"  id="pictureForm">
        <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
            <div class="panel panel-default">
                <div class="panel-heading" role="tab" id="headingOne">
                    <h4 class="panel-title">
                        <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne"
                           aria-expanded="true" aria-controls="collapseOne">
                            #1 搭建商资质证明（并提供法人身份证复印件）、展位保险〈均加盖公章〉
                        </a>
                    </h4>
                </div>
                <div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
                    <div class="panel-body">
                        <div id="photos" class=" col-xs-12 pic-list unstyled">
                            <notempty name="$list.content">
                                <foreach name="$list.content" item="v" key="k">
                                    <div class="col-xs-3" id="savedimage{$k}">
                                        <if condition="$list['status'] eq 2">
                                            <input id="photo-{$k}" type="hidden" name="content[]" value="{$v}">

                                            <img id="photo-{$k}-preview" src="{:cmf_get_image_url($v)}"
                                                 style="height:136px;width: 136px;"
                                                 onclick="parent.image_preview_dialog(this.src);">
                                            <a href="javascript:uploadOneImage('图片上传','#photo-{$k}');">替换</a>
                                            <a href="javascript:(function(){$('#savedimage{$k}').remove();})();">移除</a>
                                            <else/>
                                            <img src="{:cmf_get_image_url($v)}" style="height:136px;width: 136px;">
                                        </if>
                                    </div>
                                </foreach>
                            </notempty>
                        </div>

                        <if condition="!isset($list['status']) || $list['status'] eq 2">

                            <a href="javascript:uploadMultiImage('图片上传','#photos','photos-item-wrapper');"
                               class="btn btn-primary btn-small">选择图片</a>
                        </if>

                    </div>
                </div>
            </div>
            <hr>
            <div class="panel panel-default">
                <div class="panel-heading" role="tab" id="headingTwo">
                    <h4 class="panel-title">
                        <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion"
                           href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
                            #2 上传<span style="color: red;font-size: 20px">参展商手册</span>附件2《特装展台委托搭建协议书》、附件3《音量控制承诺书》、附件4《特装展台施工安全责任书》、证件（施工人员的身份证复印件、电工证、高处作业证复印件）〈均加盖公章〉
                        </a>
                    </h4>
                </div>
                <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
                    <div class="panel-body">
                        <div id="photos2" class=" col-xs-12 pic-list unstyled">
                            <notempty name="$list.content2">
                                <foreach name="$list.content2" item="v2" key="k2">
                                    <div class="col-xs-3" id="savedimage2{$k2}">
                                        <if condition="$list['status'] eq 2">

                                            <input id="photo-2{$k2}" type="hidden" name="content2[]" value="{$v2}">
                                            <img id="photo-2{$k2}-preview" src="{:cmf_get_image_url($v2)}"
                                                 style="height:136px;width: 136px;"
                                                 onclick="parent.image_preview_dialog(this.src);">
                                            <a href="javascript:uploadOneImage('图片上传','#photo-2{$k2}');">替换</a>
                                            <a href="javascript:(function(){$('#savedimage2{$k2}').remove();})();">移除</a>
                                            <else/>
                                            <img src="{:cmf_get_image_url($v2)}" style="height:136px;width: 136px;">
                                        </if>
                                    </div>
                                </foreach>
                            </notempty>
                        </div>
                        <if condition="!isset($list['status']) || $list['status'] eq 2">

                            <a href="javascript:uploadMultiImage('图片上传','#photos2','photos-item-wrapper2');"
                               class="btn btn-primary btn-small">选择图片</a>
                        </if>
                    </div>
                </div>
            </div>
            <hr>
            <div class="panel panel-default">
                <div class="panel-heading" role="tab" id="headingThree">
                    <h4 class="panel-title">
                        <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion"
                           href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
                            #3 展台立面效果图【要求：含正面图、侧面图、俯视图并标注尺寸，效果图需提供彩色图纸（设计师签名并盖章）】〈均加盖公章〉
                        </a>
                    </h4>
                </div>
                <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
                    <div class="panel-body">
                        <div id="photos3" class=" col-xs-12 pic-list unstyled">
                            <notempty name="$list.content3">
                                <foreach name="$list.content3" item="v3" key="k3">
                                    <div class="col-xs-3" id="savedimage3{$k3}">
                                        <if condition="$list['status'] eq 2">
                                            <input id="photo-3{$k3}" type="hidden" name="content3[]" value="{$v3}">
                                            <img id="photo-3{$k3}-preview" src="{:cmf_get_image_url($v3)}"
                                                 style="height:136px;width: 136px;"
                                                 onclick="parent.image_preview_dialog(this.src);">
                                            <a href="javascript:uploadOneImage('图片上传','#photo-3{$k3}');">替换</a>
                                            <a href="javascript:(function(){$('#savedimage3{$k3}').remove();})();">移除</a>
                                            <else/>
                                            <img src="{:cmf_get_image_url($v3)}" style="height:136px;width: 136px;">
                                        </if>
                                    </div>
                                </foreach>
                            </notempty>
                        </div>
                        <if condition="!isset($list['status']) || $list['status'] eq 2">
                            <a href="javascript:uploadMultiImage('图片上传','#photos3','photos-item-wrapper3');"
                               class="btn btn-primary btn-small">选择图片</a>
                        </if>
                    </div>
                </div>
            </div>
            <hr>
            <div class="panel panel-default">
                <div class="panel-heading" role="tab" id="heading4">
                    <h4 class="panel-title">
                        <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion"
                           href="#collapse4" aria-expanded="false" aria-controls="collapse4">
                            #4 展台平面图 【要求：需标注吊点平面分布、配电箱安装位置及展台的区域分布（设计师签名并盖章） 】、电路图【需标注电器回路、回路负载、所用材质的规格及型号（设计师签名并盖章）要求：说明所使用的灯具，插座，规格，种类，安装位置，总控制电箱具体安装位置 】〈均加盖公章〉
                        </a>
                    </h4>
                </div>
                <div id="collapse4" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading4">
                    <div class="panel-body">
                        <div id="photos4" class=" col-xs-12 pic-list unstyled">
                            <notempty name="$list.content4">
                                <foreach name="$list.content4" item="v4" key="k4">
                                    <div class="col-xs-3" id="savedimage4{$k4}">
                                        <if condition="$list['status'] eq 2">
                                            <input id="photo-4{$k4}" type="hidden" name="content4[]" value="{$v4}">
                                            <img id="photo-4{$k4}-preview" src="{:cmf_get_image_url($v4)}"
                                                 style="height:136px;width: 136px;"
                                                 onclick="parent.image_preview_dialog(this.src);">
                                            <a href="javascript:uploadOneImage('图片上传','#photo-4{$k4}');">替换</a>
                                            <a href="javascript:(function(){$('#savedimage4{$k4}').remove();})();">移除</a>
                                            <else/>
                                            <img src="{:cmf_get_image_url($v4)}" style="height:136px;width: 136px;">
                                        </if>
                                    </div>
                                </foreach>
                            </notempty>
                        </div>
                        <if condition="!isset($list['status']) || $list['status'] eq 2">
                            <a href="javascript:uploadMultiImage('图片上传','#photos4','photos-item-wrapper4');"
                               class="btn btn-primary btn-small">选择图片</a>
                        </if>
                    </div>
                </div>
            </div>
            <hr>
            <div class="panel panel-default">
                <div class="panel-heading" role="tab" id="heading5">
                    <h4 class="panel-title">
                        <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion"
                           href="#collapse5" aria-expanded="false" aria-controls="collapse5">
                            #5 施工图（全套图纸并要求标注墙体厚度、横梁跨度、门头厚度等尺寸，并提供材质阻燃合格证，地毯阻燃合格证，防火涂料合格证）〈均加盖公章〉
                        </a>
                    </h4>
                </div>
                <div id="collapse5" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading5">
                    <div class="panel-body">
                        <div id="photos5" class=" col-xs-12 pic-list unstyled">
                            <notempty name="$list.content5">
                                <foreach name="$list.content5" item="v5" key="k5">
                                    <div class="col-xs-3" id="savedimage5{$k5}">
                                        <if condition="$list['status'] eq 2">
                                            <input id="photo-5{$k5}" type="hidden" name="content5[]" value="{$v5}">
                                            <img id="photo-5{$k5}-preview" src="{:cmf_get_image_url($v5)}"
                                                 style="height:136px;width: 136px;"
                                                 onclick="parent.image_preview_dialog(this.src);">
                                            <a href="javascript:uploadOneImage('图片上传','#photo-5{$k5}');">替换</a>
                                            <a href="javascript:(function(){$('#savedimage5{$k5}').remove();})();">移除</a>
                                            <else/>
                                            <img src="{:cmf_get_image_url($v5)}" style="height:136px;width: 136px;">
                                        </if>
                                    </div>
                                </foreach>
                            </notempty>
                        </div>
                        <if condition="!isset($list['status']) || $list['status'] eq 2">
                            <a href="javascript:uploadMultiImage('图片上传','#photos5','photos-item-wrapper5');"
                               class="btn btn-primary btn-small">选择图片</a>
                        </if>
                    </div>
                </div>
            </div>
            <hr>
            <div class="panel panel-default">
                <div class="panel-heading" role="tab" id="heading6">
                    <h4 class="panel-title">
                        <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion"
                           href="#collapse6" aria-expanded="false" aria-controls="collapse6">
                            #6 简易钢架龙骨图（要求钢木混合结构，标注钢材的壁厚、连接方式、以及详细的尺寸）〈均加盖公章〉
                        </a>
                    </h4>
                </div>
                <div id="collapse6" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading6">
                    <div class="panel-body">
                        <div id="photos6" class=" col-xs-12 pic-list unstyled">
                            <notempty name="$list.content6">
                                <foreach name="$list.content6" item="v6" key="k6">
                                    <div class="col-xs-3" id="savedimage6{$k6}">
                                        <if condition="$list['status'] eq 2">
                                            <input id="photo-6{$k6}" type="hidden" name="content6[]" value="{$v6}">
                                            <img id="photo-6{$k6}-preview" src="{:cmf_get_image_url($v6)}"
                                                 style="height:136px;width: 136px;"
                                                 onclick="parent.image_preview_dialog(this.src);">
                                            <a href="javascript:uploadOneImage('图片上传','#photo-6{$k6}');">替换</a>
                                            <a href="javascript:(function(){$('#savedimage6{$k6}').remove();})();">移除</a>
                                            <else/>
                                            <img src="{:cmf_get_image_url($v6)}" style="height:136px;width: 136px;">
                                        </if>
                                    </div>
                                </foreach>
                            </notempty>
                        </div>
                        <if condition="!isset($list['status']) || $list['status'] eq 2">
                            <a href="javascript:uploadMultiImage('图片上传','#photos6','photos-item-wrapper6');"
                               class="btn btn-primary btn-small">选择图片</a>
                        </if>
                    </div>
                </div>
            </div>
            <hr>
            <div class="panel panel-default">
                <div class="panel-heading" role="tab" id="heading7">
                    <h4 class="panel-title">
                        <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion"
                           href="#collapse7" aria-expanded="false" aria-controls="collapse7">
                            #7 其他
                        </a>
                    </h4>
                </div>
                <div id="collapse7" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading7">
                    <div class="panel-body">
                        <div id="photos7" class=" col-xs-12 pic-list unstyled">
                            <notempty name="$list.content7">
                                <foreach name="$list.content7" item="v7" key="k7">
                                    <div class="col-xs-3" id="savedimage7{$k7}">
                                        <if condition="$list['status'] eq 2">
                                            <input id="photo-7{$k7}" type="hidden" name="content7[]" value="{$v7}">
                                            <img id="photo-7{$k7}-preview" src="{:cmf_get_image_url($v7)}"
                                                 style="height:136px;width: 136px;"
                                                 onclick="parent.image_preview_dialog(this.src);">
                                            <a href="javascript:uploadOneImage('图片上传','#photo-7{$k7}');">替换</a>
                                            <a href="javascript:(function(){$('#savedimage7{$k7}').remove();})();">移除</a>
                                            <else/>
                                            <img src="{:cmf_get_image_url($v7)}" style="height:136px;width: 136px;">
                                        </if>
                                    </div>
                                </foreach>
                            </notempty>
                        </div>
                        <if condition="!isset($list['status']) || $list['status'] eq 2">
                            <a href="javascript:uploadMultiImage('图片上传','#photos7','photos-item-wrapper7');"
                               class="btn btn-primary btn-small">选择图片</a>
                        </if>
                    </div>
                </div>
            </div>
            <hr>

        </div>
        <div class="row text-center">
            <input type="hidden" name="room_id" value="{$room_id}">

            <!--            <a onclick="save()" class="btn btn-primary">保存</a>-->
            <if condition="!isset($list['status']) || $list['status'] eq 2">

                <button class="btn btn-primary js-ajax-submit" type="submit">提交</button>
            </if>
        </div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script type="text/html" id="photos-item-wrapper">
    <div class="col-xs-3" id="savedimage{id}">
        <input id="photo-{id}" type="hidden" name="content[]" value="{filepath}">
        <img id="photo-{id}-preview" src="{url}" style="height:136px;width: 136px;"
             onclick="parent.image_preview_dialog(this.src);">
        <a href="javascript:uploadOneImage('图片上传','#photo-{id}');">替换</a>
        <a href="javascript:(function(){$('#savedimage{id}').remove();})();">移除</a>
    </div>
</script>

<script type="text/html" id="photos-item-wrapper2">
    <div class="col-xs-3" id="savedimage2{id}">
        <input id="photo-2{id}" type="hidden" name="content2[]" value="{filepath}">
        <img id="photo-2{id}-preview" src="{url}" style="height:136px;width: 136px;"
             onclick="parent.image_preview_dialog(this.src);">
        <a href="javascript:uploadOneImage('图片上传','#photo-2{id}');">替换</a>
        <a href="javascript:(function(){$('#savedimage2{id}').remove();})();">移除</a>
    </div>
</script>

<script type="text/html" id="photos-item-wrapper3">
    <div class="col-xs-3" id="savedimage3{id}">
        <input id="photo-3{id}" type="hidden" name="content3[]" value="{filepath}">
        <img id="photo-3{id}-preview" src="{url}" style="height:136px;width: 136px;"
             onclick="parent.image_preview_dialog(this.src);">
        <a href="javascript:uploadOneImage('图片上传','#photo-3{id}');">替换</a>
        <a href="javascript:(function(){$('#savedimage3{id}').remove();})();">移除</a>
    </div>
</script>
<script type="text/html" id="photos-item-wrapper4">
    <div class="col-xs-3" id="savedimage4{id}">
        <input id="photo-4{id}" type="hidden" name="content4[]" value="{filepath}">
        <img id="photo-4{id}-preview" src="{url}" style="height:136px;width: 136px;"
             onclick="parent.image_preview_dialog(this.src);">
        <a href="javascript:uploadOneImage('图片上传','#photo-4{id}');">替换</a>
        <a href="javascript:(function(){$('#savedimage4{id}').remove();})();">移除</a>
    </div>
</script>
<script type="text/html" id="photos-item-wrapper5">
    <div class="col-xs-3" id="savedimage5{id}">
        <input id="photo-5{id}" type="hidden" name="content5[]" value="{filepath}">
        <img id="photo-5{id}-preview" src="{url}" style="height:136px;width: 136px;"
             onclick="parent.image_preview_dialog(this.src);">
        <a href="javascript:uploadOneImage('图片上传','#photo-5{id}');">替换</a>
        <a href="javascript:(function(){$('#savedimage5{id}').remove();})();">移除</a>
    </div>
</script>
<script type="text/html" id="photos-item-wrapper6">
    <div class="col-xs-3" id="savedimage6{id}">
        <input id="photo-6{id}" type="hidden" name="content6[]" value="{filepath}">
        <img id="photo-6{id}-preview" src="{url}" style="height:136px;width: 136px;"
             onclick="parent.image_preview_dialog(this.src);">
        <a href="javascript:uploadOneImage('图片上传','#photo-6{id}');">替换</a>
        <a href="javascript:(function(){$('#savedimage6{id}').remove();})();">移除</a>
    </div>
</script>
<script type="text/html" id="photos-item-wrapper7">
    <div class="col-xs-3" id="savedimage7{id}">
        <input id="photo-7{id}" type="hidden" name="content7[]" value="{filepath}">
        <img id="photo-7{id}-preview" src="{url}" style="height:136px;width: 136px;"
             onclick="parent.image_preview_dialog(this.src);">
        <a href="javascript:uploadOneImage('图片上传','#photo-7{id}');">替换</a>
        <a href="javascript:(function(){$('#savedimage7{id}').remove();})();">移除</a>
    </div>
</script>
<script type="text/javascript" src="/themes/admin_simpleboot3/public/assets/js/jszip.min.js"></script>
<script type="text/javascript" src="/themes/admin_simpleboot3/public/assets/js/jszip-utils.js"></script>
<script type="text/javascript" src="/themes/admin_simpleboot3/public/assets/js/FileSaver.js"></script>
<script>
    function test(){
        // var JSZip = require("jszip");
        var zip = new JSZip();
        zip.file("Hello.txt", "Hello World\n");
        var img = zip.folder("images");
        img.file("https://zhanhuiimg.oss-cn-beijing.aliyuncs.com/ab8dd365fcc27bd40a660c56a19ec49a.jpeg", imgData, {base64: true});
        var content = zip.generate({type:"blob"});
// see FileSaver.js
        saveAs(content, "example.zip");

    }
    $(function () {
        // 后台传数据
        // 有数据 展示
        // 没有数据 读取缓存

        // 根据状态 展示是否可上传编辑
        // 1 不能编辑  0 ， 2 可编辑
        var info
    })
    //
    // function save() {
    //     var a = $('#pictureForm').serialize()
    //     $.ajax({
    //         url: "{:url('saveData')}",
    //         data: a,
    //         method: 'POST',
    //         success: function (re) {
    //             console.log(re)
    //             localStorage.setItem('pic', JSON.stringify(re))
    //         }
    //     })
    //
    // }
</script>

</body>
</html>